<?php


namespace app\api\controller;


use support\Log;
use support\Redis;
use support\Request;

class UserController
{
    public function hello(Request $request)
    {

//        $default_name = 'ait';
//        $name = $request->get('name',$default_name);
//        return response('hello '.$name);



        return response('hello '.$request->method());


//        return response('hello '.$request->getRealIp($safe_mode=true));
    }


    public function test(Request $request)
    {
        var_dump(24342);
        Redis::set('yrc',22211,'ex',9999);

var_dump(Redis::get('yrc'));
Log::info('test',[34,'alfkj']);
$log = Log::channel('log2');
$log->info('log2 test');

        return response(base_path());
        return response($request->get('name','aa'));
//        return response($request->all());
    }
}